'use strict';

const Controller = require('egg').Controller;

class TokenController extends Controller {
  async index () {
    const { ctx,app} = this;
    const token = app.jwt.sign(app.config.jwt.secret);
    ctx.body = {
        apikey:token
    }
  }
}

module.exports = TokenController;